<?php
namespace app\common\validate;

use think\Validate;

class HelpValidate extends Validate
{
    protected $rule =   [
        'user_id|用户ID'    => 'require|integer',
        'help_id|求助ID'    => 'require|integer',
        'page|页数'         => 'require|integer',
        'limit|条数'        => 'require|integer',
        'price|悬赏金额'    => 'require',
        'content|内容'      => 'require|length:1,1000',
    ];
    
    protected $scene = [
        'list'     => ['user_id', 'page', 'limit'],
        'show'     => ['help_id'],
        'add'      => ['user_id', 'price', 'content'],
    ];
}